﻿<UserControl x:Class="IBR.StringResourceBuilder2011.GUI.ctlListEditor"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="254"
             d:DesignWidth="283"
             MinHeight="254"
             MinWidth="283"
             Background="#FFF9F9F9" xmlns:my="clr-namespace:IBR.StringResourceBuilder2011.GUI">
  <Grid>
    <GroupBox Grid.Column="0" Margin="2" Header="{Binding Path=Header, RelativeSource={RelativeSource FindAncestor, AncestorType=my:ctlListEditor, AncestorLevel=1}}">
      <!--{Binding Path=Header, RelativeSource={RelativeSource FindAncestor, AncestorType=my:ctlListEditor, AncestorLevel=1}}-->
      <Grid Margin="2,4,2,2">
        <Grid.RowDefinitions>
          <RowDefinition Height="*"/>
          <RowDefinition Height="28"/>
          <RowDefinition Height="31"/>
        </Grid.RowDefinitions>
        <ListBox Grid.Row="0" Name="lstList" SelectionChanged="lstList_SelectionChanged">
        </ListBox>
        <TextBox Grid.Row="1" Height="24" Name="txtItem" VerticalAlignment="Center" Text="{Binding ElementName=lstList, Path=SelectedItem}" TextChanged="txtItem_TextChanged" KeyDown="txtItem_KeyDown" ToolTip="Enter string" />
        <Grid Grid.Row="2">
          <StackPanel Grid.Column="0" HorizontalAlignment="Left" Orientation="Horizontal" VerticalAlignment="Bottom">
            <Button Height="23" Margin="8,8,0,0" Name="btnUndo" Width="23" Focusable="False" Click="btnUndo_Click" ToolTip="Undo last action">
              <Image Height="16" Width="16" Source="/IBR.StringResourceBuilder2011;component/Images/Undo.png" Stretch="None" />
            </Button>
            <Button Height="23" Margin="8,8,0,0" Name="btnRedo" Width="23" Focusable="False" Click="btnRedo_Click" ToolTip="Redo last undone action">
              <Image Height="16" Width="16" Source="/IBR.StringResourceBuilder2011;component/Images/Redo.png" Stretch="None" />
            </Button>
          </StackPanel>
          <StackPanel Grid.Column="1" HorizontalAlignment="Right" Orientation="Horizontal" VerticalAlignment="Bottom">
            <Button Height="23" Margin="0,8,8,0" Name="btnAdd" Width="89" Focusable="False" Click="btnAdd_Click" ToolTip="Add string to the list">
              <StackPanel Orientation="Horizontal">
                <Image Height="16" Width="16" Source="/IBR.StringResourceBuilder2011;component/Images/bt_add_shadow.png" Stretch="None" />
                <TextBlock Text="Add" Margin="4,0,0,0"/>
              </StackPanel>
            </Button>
            <Button Height="23" Margin="0,8,8,0" Name="btnRemove" Width="89" Focusable="False" Click="btnRemove_Click" ToolTip="Remove string from the list">
              <StackPanel Orientation="Horizontal">
                <Image Height="16" Width="16" Source="/IBR.StringResourceBuilder2011;component/Images/bt_remove_shadow.png" Stretch="None" />
                <TextBlock Text="Remove" Margin="4,0,0,0"/>
              </StackPanel>
            </Button>
          </StackPanel>
        </Grid>
      </Grid>
    </GroupBox>
  </Grid>
</UserControl>
